//
//  LXFormCell.m
//  跑跑快销
//
//  Created by linxian on 14-5-8.
//  Copyright (c) 2014年 ylife. All rights reserved.
//
#define LableWidth self.frame.size.width / 4
#define CellHeight 40
#import "LXFormCell.h"

@implementation LXFormCell
@synthesize nameLab, sizeLab, priceLab, codeLab;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        
        self.backgroundColor = [UIColor grayColor];
        [self drawCell];
    }
    return self;
}
- (void)drawCell
{
    
    nameLab = [[UILabel alloc]initWithFrame:CGRectMake(0 , 0, LableWidth, CellHeight)];
    [nameLab setTextAlignment:NSTextAlignmentCenter];
    nameLab.layer.borderColor = [UIColor blackColor].CGColor;
    nameLab.layer.borderWidth = 0.25;
    [nameLab setFont:[UIFont systemFontOfSize:15]];
    [self addSubview:nameLab];
    
    sizeLab= [[UILabel alloc]initWithFrame:CGRectMake(LableWidth, 0, LableWidth, CellHeight)];
    [sizeLab setTextAlignment:NSTextAlignmentCenter];
    sizeLab .layer.borderColor = [UIColor blackColor].CGColor;
    sizeLab.layer.borderWidth = 0.25;
    [sizeLab setFont:[UIFont systemFontOfSize:15]];
    [self addSubview:sizeLab];
    
    priceLab = [[UILabel alloc]initWithFrame:CGRectMake(LableWidth*2, 0, LableWidth, CellHeight)];
    [priceLab setTextAlignment:NSTextAlignmentCenter];
    priceLab.layer.borderColor = [UIColor blackColor].CGColor;
    priceLab.layer.borderWidth = 0.25;
    [priceLab setFont:[UIFont systemFontOfSize:15]];
    [self addSubview:priceLab];
    
    codeLab = [[UILabel alloc]initWithFrame:CGRectMake(LableWidth*3, 0, LableWidth, CellHeight)];
    [codeLab setTextAlignment:NSTextAlignmentCenter];
    codeLab.layer.borderColor = [UIColor blackColor].CGColor;
    codeLab.layer.borderWidth = 0.25;
    [codeLab setFont:[UIFont systemFontOfSize:15]];
    [self addSubview:codeLab];
}
- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
